﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using WX.WMS.BLL;
using WX.WMS.Common;
using WX.WMS.DataModel;

public partial class Login : PageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {
      

    }
    protected override void OnInit(EventArgs e)
    {

        //base.OnInit(e);
    }
    protected void LoginButton_Click(object sender, ImageClickEventArgs e)
    {

        UserBLL BllUser = new UserBLL();
        Guid guid = new BaseDAO().GetGUID();
            string userName = StrHelper.ConvertSql(UserName.Text.ToString());
            string userPwd = StrHelper.EncryptPassword(PassWord.Text.ToString(), StrHelper.PasswordType.MD5);
            if (BllUser.IsLoginValidate(userName, userPwd))
            {
                T_SYS_USER User = BllUser.GetUserByName(userName);
               UserInfo = User;
                Response.Redirect("Index.aspx");
            }
           else{
                 ShowMessage("登陆失败");
                return ;
            }

    }
}
